-
Notifications
You must be signed in to change notification settings - Fork 0
test: add benchmarks #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
e796751
to
4dd55cd
Compare
ece055f
to
fdd30f4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, fix the red CI.
.PHONY: bench | ||
bench: | ||
@echo "Running benchmarks" | ||
@go test ./... -count=1 -bench=. -benchmem |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need the benchmem? If so - ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-benchmem
will show allocation count, I think it's necessary information for us to use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are interested in number of allocation and this option displays allocation statistic.
dec := msgpack.GetDecoder() | ||
dec.Reset(&buf) | ||
|
||
b.Run("Optional1Bench", func(b *testing.B) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it a go-idiomic practice to name the tests in the manner? Why do we need the CamelCase here? Why not just "optional simple bench" or so on?
Up to @bigbes .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I don't have any strong opinion about naming of subtests. On one hand I'm preferring to have name that I can copy to cli to run subtest, but go-idiomatic way is to write clear names with spaces in lowercase.
Let's stick with go-idiomatic way there.
Pls, add
|
Probably we could just update the README.md instead of a separate document. The README.md now is small and shouldn't become too big. |
Closes TNTP-3733
fdd30f4
to
e6db0a0
Compare
I didn't forget about (remove if it is not applicable):
Related issues:
Closes TNTP-3733